import { $get } from '@js/authRequest'

// 获取审限期满之日
export async function getBeginTime (caseid) {
  const res = await $get('/api/xapc/case/calculateTrialLimit', {
    caseid
  })
  if (res.status !== 1) {
    throw new Error(res.message)
  }
  return res.data
}

// 获取延长天数之后的日期
export async function getEndDate (beginDatetime, days) {
  const res = await $get('/api/common/days/getEndDatetime', {
    begin_datetime: beginDatetime,
    days
  })
  if (res.status !== 1) {
    throw new Error(res.message)
  }
  return res.data
}
